package com.wx.pay.util;

/**
 * 订单工具类
 * @author kinfeng
 * @since 2016-08-11
 */
public class OrderUtils {
	
	/**
	 * 生成订单号 
	 */
	public static String getCovertCode(String openId){
		String openId8 = openId.substring(0,4)+openId.substring(openId.length()-4,openId.length());
		long time = System.currentTimeMillis();
		return openId8 + time;
	}
	/**
	 * 生成订单号 
	 */
	public static String genOrderNo(String openId){
		String openId8 = openId.substring(0,4)+openId.substring(openId.length()-4,openId.length());
		long time = System.currentTimeMillis();
		return "FM"+openId8 + time;
	}
	public static void main(String[] args) {
		
		System.out.println(	genOrderNo("oTKjy0c2XP6vCn6EwJF39uprkYIU"));
	}
}
